home *** CD-ROM | disk | FTP | other *** search
-
-
-
- cc User Commands cc
-
-
-
- NNaammee
- cc - RISC C compiler
-
- SSyynnttaaxx
- cccc [ _o_p_t_i_o_n ] ... _f_i_l_e
-
- DDeessccrriippttiioonn
- The command invokes the RISC _u_c_o_d_e C compiler. It produces
- RISC object code in RISC extended _c_o_f_f format (the default),
- binary or symbolic _u_c_o_d_e, _u_c_o_d_e object files and binary or
- symbolic assembly language.
-
- The command accepts the following arguments:
-
- o+ Arguments ending in .c are interpreted as C source pro-
- grams. They are compiled, and the resulting object
- file has the same name as the source program except .o
- is substituted for .c. If a single C source program is
- compiled and loaded at once, the .o file is deleted.
-
- o+ Arguments ending in .s are interpreted as assembly
- source programs. When they are assembled, they produce
- a .o file.
-
- o+ Arguments ending in .i are interpreted as C source
- after being processed by the C preprocessor. They are
- compiled without being processed by the C preprocessor.
-
- If the highest level of optimization is specified (with the
- --OO33 flag) or only _u_c_o_d_e object files are to be produced
- (with the --jj flag) each C source file is compiled into a
- _u_c_o_d_e object file. The _u_c_o_d_e object file is left in a file
- whose name consists of the last component of the source with
- .u substituted for .c.
-
- The following suffixes aid compiler development, but are not
- generally used: .B, .O., .S, and .M. These arguments are
- interpreted as binary _u_c_o_d_e, produced by the front end,
- optimizer, ucode object file splitter, and ucode merger
- respectively. Arguments whose names end with .U are assumed
- to be symbolic _u_c_o_d_e. Arguments whose names end with .G are
- assumed to be binary assembly language, which is produced by
- the code generator and the symbolic to binary assembler.
-
- Files that are assumed to be binary _u_c_o_d_e, symbolic _u_c_o_d_e,
- or binary assembly language by the suffix conventions are
- also assumed to have their corresponding symbol table in a
- file with a .T suffix.
-
- The command always defines the C preprocessor macro
- LLAANNGGUUAAGGEE__CC when a .c file is being compiled. The command
- defines the C preprocessor macro LLAANNGGUUAAGGEE__AASSSSEEMMBBLLYY when a .s
-
-
-
- Sprite v1.0 RISC 1
-
-
-
-
-
-
- cc User Commands cc
-
-
-
- file is compiled.
-
- OOppttiioonnss
- The following options are interpreted by See for load-time
- options.
-
- --cc Suppress the loading phase of the compilation
- and force an object file to be produced even
- if only one program is compiled.
-
- --gg00 Do not produce symbol table information for
- symbolic debugging. This is the default.
-
- --gg11 Produce debugger symbol table information.
- This option limits optimization, but some
- optimizations that affect debugger accuracy
- might be performed. The debugger symbol table
- is built before optimizations and cannot
- reflect the optimizations.
-
- --gg or --gg22 Produce debugger symbol table information and
- inhibit optimizations that limit full sym-
- bolic debugging. The debugger symbol table is
- accurate.
-
- --gg33 Produce debugger symbol table. This option
- does not limit optimizations, so the symbol
- table may be inaccurate. The symbol table is
- built before optimizations and cannot reflect
- the optimizations.
-
- --LL Change the algorithm of searching for lliibb_x..aa
- or lliibb_x..bb to nneevveerr look in the default direc-
- tories. This is useful when the default
- directories for libraries should not be
- searched and only the directories specified
- by the option --LL_d_i_r are to be searched.
-
- --ww Suppress warning messages.
-
- --pp00 Do not permit profiling. This is the
- default. If loading happens, the standard
- runtime startup routine (ccrrtt00..oo) is used and
- the profiling libraries are not searched.
-
- --pp11 or --pp Set up for profiling by periodically sampling
- the value of the program counter. This
- option only affects the loading. When load-
- ing happens, this option replaces the stan-
- dard runtime startup routine with the profil-
- ing runtime startup routine (mmccrrtt00..oo) and
- searches the level 1 profiling library
-
-
-
- Sprite v1.0 RISC 2
-
-
-
-
-
-
- cc User Commands cc
-
-
-
- (lliibbpprrooff11..aa). When profiling happens, the
- startup routine calls and produces a file
- _m_o_n._o_u_t that contains execution-profiling
- data for use with the postprocessor
-
- --OO00 Turn off all optimizations.
-
- --OO11 Turn on all optimizations that complete fast.
- This is the default.
-
- --OO or --OO22 Invoke the global _u_c_o_d_e optimizer.
-
- --OO33 Perform all optimizations, including global
- register allocation. This option must pre-
- cede all source file arguments. With this
- option, a _u_c_o_d_e object file is created for
- each C source file and left in a .u file.
- The newly created ucode object files, the
- ucode object files specified on the command
- line, the runtime startup routine, and all
- the runtime libraries are ucode linked.
- Optimization is performed on the resulting
- ucode linked file and then it is linked as
- normal producing an a.out file. A resulting
- .o file is not left from the ucode linked
- result. In fact --cc cannot be specified with
- --OO33.
-
- --ffeeeeddbbaacckk _f_i_l_e Use with the --ccoorrdd option to specify the
- feedback file. This _f_i_l_e is produced by with
- its --ffeeeeddbbaacckk option from an execution of the
- program produced by
-
- --ccoorrdd Run the procedure-rearranger on the resulting
- file after linking. The rearrangement is
- performed to reduce the cache conflicts of
- the program's text. The output is left in
- the file specified by the --oo _o_u_t_p_u_t option or
- a.out by default. At least one --ffeeeeddbbaacckk
- _f_i_l_e must be specified.
-
- --jj Compile the specified source programs, and
- leave the _u_c_o_d_e object file output in
- corresponding files with the .u suffix.
-
- --kkoo _o_u_t_p_u_t Name the output file created by the ucode
- loader as _o_u_t_p_u_t. This file is not removed.
- If this file is compiled, the object file is
- left in a file whose name consists of _o_u_t_p_u_t
- with the suffix changed to an .o. If _o_u_t_p_u_t
- has no suffix, an .o suffix is appended to
- _o_u_t_p_u_t.
-
-
-
- Sprite v1.0 RISC 3
-
-
-
-
-
-
- cc User Commands cc
-
-
-
- --kk Pass options that start with a --kk to the
- ucode loader. This option is used to specify
- ucode libraries (with --kkll_x ) and other ucode
- loader options.
-
- --SS Compile the specified source programs and
- leave the symbolic assembly language output
- in corresponding files suffixed with .s.
-
- --PP Run only the C macro preprocessor and put the
- result for each source file using suffix con-
- vention (for example, .c and .s) in a
- corresponding .i file. The .i file does not
- have number lines (#) in it. This sets the
- --ccpppp option.
-
- --EE Run only the C macro preprocessor on the
- files (regardless of any suffix or not), and
- send the result to the standard output. This
- sets the --ccpppp option.
-
- --EEmm Runs only the macro preprocessor on the named
- C programs and produces the makefile depen-
- dencies.
-
- --oo _o_u_t_p_u_t Name the final output file _o_u_t_p_u_t. If this
- option is used, the file a.out is unaffected.
-
- --DD_n_a_m_e=_d_e_f
- --DD_n_a_m_e Define the _n_a_m_e to the C macro preprocessor,
- as if by `#define'. If a definition is not
- given, the name is defined as 1.
-
- --UU_n_a_m_e Remove any initial definition of _n_a_m_e.
-
- --II_d_i_r Search for #include files whose names do not
- begin with a slash (/) in the following
- order: (1) in the directory of the _d_i_r argu-
- ment, (2) in the directories specified by --II
- options, (3) in the standard directory
- (//uussrr//iinncclluuddee).
-
- --II Do not search for #include in the standard
- directory (//uussrr//iinncclluuddee).
-
- --MM Specifies the floating point type to be used
- for double-precision floating point and is
- passed on to as the map option.
-
- --WW11,,MM Same a -M, except it is POSIX compliant.
-
- --GG _n_u_m Specify the maximum size, in bytes, of a data
-
-
-
- Sprite v1.0 RISC 4
-
-
-
-
-
-
- cc User Commands cc
-
-
-
- item that is to be accessed from the global
- pointer. The _n_u_m argument is interpreted as
- a decimal number. If _n_u_m is zero, data is
- not accessed from the global pointer. The
- default value for _n_u_m is 8 bytes.
-
- --vv Print the passes as they execute with their
- arguments and their input and output files.
- Also prints resource usage in the C shell
- _t_i_m_e format.
-
- --VV Print the version of the driver and the ver-
- sions of all passes. This is done with the
- command.
-
- --ssttdd Produce warnings for things that are not
- standard in the language.
-
- --YY_e_n_v_i_r_o_n_m_e_n_t Compiles C programs for _e_n_v_i_r_o_n_m_e_n_t. If
- _e_n_v_i_r_o_n_m_e_n_t is SYSTEM_FIVE or is omitted, it
- defines SYSTEM_FIVE for the preprocessor, If
- the loader is invoked, it specifies that the
- System V version of the C runtime library is
- used. Also, if the math library is specified
- with the --llmm option, the System V version is
- used. If _e_n_v_i_r_o_n_m_e_n_t is POSIX, it defines
- POSIX for the preprocessor. If the environ-
- ment variable PROG_ENV has the value
- SYSTEM_FIVE or POSIX, the effect is the same
- as when specifying the corresponding --YY_e_n_-
- _v_i_r_o_n_m_e_n_t option to The --YY option overrides
- the PROG_ENV variable; --YYBBSSDD can be used to
- override all special actions.
-
- --ccpppp Run the C macro preprocessor on C and assem-
- bly source files before compiling. This is
- the default for
-
- --nnooccpppp Do not run the C macro preprocessor on C and
- assembly source files before compiling.
-
- --OOlliimmiitt _n_u_m Specify the maximum size, in basic blocks, of
- a routine that will be optimized by the glo-
- bal optimizer. If a routine has more than
- the specified number of basic blocks, it can-
- not be optimized and a message is printed. A
- --OO,, --OO22,, or --OO33 must be used to specify the
- global optimizer. The argument must also be
- specified. The argument _n_u_m is interpreted as
- a decimal number. The default value for _n_u_m
- is 500 basic blocks.
-
-
-
-
- Sprite v1.0 RISC 5
-
-
-
-
-
-
- cc User Commands cc
-
-
-
- --ssiiggnneedd Causes all _c_h_a_r declarations to be _s_i_g_n_e_d
- _c_h_a_r declarations. This is the default.
-
- --uunnssiiggnneedd Causes all _c_h_a_r declarations to be _u_n_s_i_g_n_e_d
- _c_h_a_r declarations.
-
- --vvoollaattiillee Causes all variables to be treated as _v_o_l_a_-
- _t_i_l_e.
-
- --vvaarraarrggss Prints warnings for lines that may require
- the _v_a_r_a_r_g_s._h macros.
-
- --ff Causes the compiler not to promote expres-
- sions of type _f_l_o_a_t to type _d_o_u_b_l_e.
-
- --ffllooaatt Same as the --ff option.
-
- --ffiillll _n_u_m_b_e_r Set the fill pattern for ``holes'' within an
- output section. The _n_u_m_b_e_r argument is a four
- byte hex constant. The --EEBB and --EELL options
- are needed only when compiling for RISC
- machines from vendors other than Digital.
- The default target byte ordering matches the
- machine where the compiler is running. The
- options --EEBB and --EELL specify the target byte
- ordering (big-endian and little-endian,
- respectively). The compiler also defines a C
- preprocessor macro for the target byte order-
- ing. These C preprocessor macros are MMIIPPSSEEBB
- and MMIIPPSSEELL for big-endian and little-endian
- byte ordering respectively.
-
- If the specified target byte ordering does not match the
- machine where the compiler is running, then the runtime
- startups and libraries come from //uussrr//lliibbeebb for big-endian
- runtimes on a little-endian machine and from //uussrr//lliibbeell for
- little-endian runtimes on a big-endian machine.
-
- --EEBB Produce object files targeted for big-endian
- byte ordering. The C preprocessor macro MMIIPP--
- SSEEBB is defined by the compiler.
-
- --EELL Produce object files targeted for little-
- endian byte ordering. The C preprocessor
- macro MMIIPPSSEELL is defined by the compiler.
-
- The following options primarily aid compiler development and
- are not generally used:
-
- --HH_c Halt compiling after the pass specified by
- the character _c, producing an intermediate
- file for the next pass. The _c can be [[
-
-
-
- Sprite v1.0 RISC 6
-
-
-
-
-
-
- cc User Commands cc
-
-
-
- ffjjuussmmooccaa ]].. It selects the compiler pass in
- the same way as the --tt option. If this
- option is used, the symbol table file pro-
- duced and used by the passes is the last com-
- ponent of the source file with the suffix
- changed to .T. It is not removed.
-
- --KK Build and use intermediate file names with
- the last component of the source file's name
- replacing its suffix with the conventional
- suffix for the type of file (for example, .B
- file for binary _u_c_o_d_e, produced by the front
- end). These intermediate files are never
- removed even when a pass encounters a fatal
- error. When ucode linking is performed and
- the --KK option is specified, the base name of
- the files created after the ucode link is
- u.out by default. If --kkoo _o_u_t_p_u_t is speci-
- fied, the base name of the object file is
- _o_u_t_p_u_t without the suffix. Suffixes are
- appended to _o_u_t_p_u_t if it does not have a suf-
- fix.
-
- --## Converts binary _u_c_o_d_e files (.B) or optimized
- binary ucode files (.O) to symbolic _u_c_o_d_e (a
- .U file). If a symbolic ucode file is to be
- produced by converting the binary _u_c_o_d_e from
- the C compiler front end then the front end
- option --XXuu iiss uusseedd..
-
- --WW_c[_c...],_a_r_g_1[,_a_r_g_2...]
- Pass the argument[s] _a_r_g_i to the compiler
- pass[es] _c[_c..]. The _c'_s are one of [[
- ppffjjuussmmooccaabbllyyzz ]].. The c's selects the compiler
- pass in the same way as the --tt option.
-
- The options --tt[hhppffjjuussmmooccaabbllyyzzrrnntt], --hh_p_a_t_h, and --BB_s_t_r_i_n_g
- select a name to use for a particular pass, startup routine,
- or standard library. These arguments are processed from
- left to right so their order is significant. When the --BB
- option is encountered, the selection of names takes place
- using the last --hh and --tt options. Therefore, the --BB option
- is always required when using --hh or --tt. Sets of these
- options can be used to select any combination of names.
-
- The --EEBB or --EELL options and the --pp[[0011]] options must precede
- all --BB options because they can affect the location of run-
- time libraries and which runtime libraries are used.
-
- --tt[hhppffjjuussmmooccaabbllyyzzrrnntt]
- Select the names. The names must be selected
- from the options in the following table:
-
-
-
- Sprite v1.0 RISC 7
-
-
-
-
-
-
- cc User Commands cc
-
-
-
- Name Character
- include h (see note below)
- cpp p
- ccom f
- ujoin j
- uld u
- usplit s
- umerge m
- uopt o
- ugen c
- as0 a
- as1 b
- ld l
- ftoc y
- cord z
- [m]crt0.o r
- libprof1.a n
- btou, utob t
- If the character h is in the --tt argument then
- a directory is added to the list of direc-
- tories to be used in searching for #include
- files. This directory name has the form
- COMP_TARGET_ROOT/usr/include_s_t_r_i_n_g . This
- directory is to contain the include files for
- the _s_t_r_i_n_g release of the compiler. The
- standard directory is still searched.
-
- --hh_p_a_t_h Use _p_a_t_h rather than the directory where the
- name is normally found.
-
- --BB_s_t_r_i_n_g Append _s_t_r_i_n_g to all names specified by the
- --tt option. If the --tt option has not been
- processed before the --BB,, the --tt option is
- assumed to be the following: hpfjusmocab-
- lyzrnt. This list designates all names. If
- the --tt argument has not been processed before
- the --BB argument, --BB_s_t_r_i_n_g is passed to the
- loader to use with its --ll_x arguments.
-
- Invoking the compiler with a name of the form cccc_s_t_r_i_n_g has
- the same effect as using a --BB_s_t_r_i_n_g option on the command
- line.
-
- If the environment variable COMP_HOST_ROOT is set, the value
- is used as the root directory for all pass names rather than
- the default slash (/). If the environment variable
- COMP_TARGET_ROOT is set, the value is used as the root
- directory for all include and library names rather than the
- default slash (/). This affects the standard directory for
- #include files, /usr/include, and the standard library,
- /usr/lib/libc.a. If this is set then the only directory
- that is searched for libraries, using the --ll_x option, is
-
-
-
- Sprite v1.0 RISC 8
-
-
-
-
-
-
- cc User Commands cc
-
-
-
- COMP_TARGET_ROOT/usr/lib .
-
- If the environment variable TMPDIR is set, the value is used
- as the directory to place any temporary files rather than
- the default //ttmmpp// ..
-
- If the environment variable RLS_ID_OBJECT is set, the value
- is used as the name of an object to link in if a link takes
- place. This is used to add release identification informa-
- tion to objects. It is always the last object specified to
- the loader.
-
- Other arguments are assumed to be either loader options or
- C-compatible object files, typically produced by an earlier
- run, or perhaps libraries of C-compatible routines. These
- files, together with the results of any compilations speci-
- fied, are loaded in the order given, producing an executable
- program with the default name aa..oouutt..
-
- OOppttiioonnss
- The ULTRIX C compiler provides the following default symbols
- for your use. These symbols are useful in ifdef statements
- to isolate code for one of the particular cases. Thus,
- these symbols can be useful for ensuring portable code.
-
- unix Any UNIX system
-
- bsd4_2 Berkeley UNIX Version 4.2
-
- ultrix ULTRIX only
-
- mips Any RISC architecture
-
- MIPSEL Little endian variant of MIPS architecture
-
- host_mips Native compilation environment (as opposed to
- cross-compiler)
-
- RReessttrriiccttiioonnss
- The standard library, /usr/lib/libc.a, is loaded by using
- the -lc loader option and not a full path name. The wrong
- library may be loaded if there are files with the name
- libc.a_s_t_r_i_n_g in the directories specified with the --LL loader
- option or in the default directories searched by the loader.
-
- The handling of include directories and libc.a is confusing.
-
- FFiilleess
- file.c input file
- file.o object file
- a.out loaded output
- /tmp/ctm? temporary
-
-
-
- Sprite v1.0 RISC 9
-
-
-
-
-
-
- cc User Commands cc
-
-
-
- /usr/lib/cpp C macro preprocessor
- /usr/lib/ccom C front end
- /usr/lib/ujoin binary ucode and symbol table joiner
- /usr/bin/uld ucode loader
- /usr/lib/usplit binary ucode and symbol table splitter
- /usr/lib/umerge procedure intergrator
- /usr/lib/uopt optional global ucode optimizer
- /usr/lib/ugen code generator
- /usr/lib/as0 symbolic to binary assembly language
- translator
- /usr/lib/as1 binary assembly language assembler and
- reorganizer
- /usr/lib/crt0.o runtime startup
- /usr/lib/mcrt0.o startup for profiling
- /usr/lib/libc.a standard library, see intro(3)
- /usr/lib/libprof1.a level 1 profiling library
- /usr/include standard directory for #include files
- /usr/bin/ld MIPS loader
- /usr/lib/ftoc interface between and cord
- /usr/lib/cord procedure-rearranger
- /usr/bin/btou binary to symbolic ucode translator
- /usr/bin/utob symbolic to binary ucode translator
- mon.out file produced for analysis by
-
- Runtime startups and libraries for the opposite byte sex of
- machine the compiler is running on have the same names but
- are located in different directories. For big-endian run-
- times on a little-endian machine the directory is /usr/libeb
- and for little-endian runtimes on a big-endian machine the
- directory is /usr/libel.
-
- SSeeee AAllssoo
- dbx(1), ld(1), pixie(1), prof(1), what(1), monitor(3)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 RISC 10
-
-
-
-